package com.fourth.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fourth.service.EmpInfoService;

import com.ljx.entity.EmpInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LJX
 * @Description: TODO
 * @Date: 2023/2/23 10:07
 * @Version 1.0
 */
@RestController
@RequestMapping("/system/empInfo")
public class EmpInfoController {
	@Autowired
	private EmpInfoService empInfoService;


	@GetMapping("/getByName/{ename}")
	public EmpInfo getByName(@PathVariable String ename){
		QueryWrapper<EmpInfo> wrapper=new QueryWrapper<>();
		wrapper.eq("ename",ename);
		EmpInfo empInfo = empInfoService.getOne(wrapper);
		return empInfo;
	}
}
